package com.hs.mobile.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hs.mobile.model.ServiceMB;
import com.hs.mobile.service.register.RegisterService;
import com.hs.mobile.service.service.ServicesMBService;

import javax.annotation.Resource;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.GET;
@Controller
public class ServiceController {
	@Resource(name="serviceService")
	private ServicesMBService mobileService;
	@Autowired
	public ServiceController( ServicesMBService mobileService){
		this.mobileService = mobileService;
	}
	
	@GET
	@RequestMapping(value="/service/{id}", method = RequestMethod.GET)
	@Produces(MediaType.APPLICATION_JSON)
	public @ResponseBody ServiceMB getServiceById(@PathVariable("id") Long id )
	{
		return mobileService.findServiceById(id);
	}
}
